package cn.com.swu.mianyangapp.ui.message;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import cn.com.swu.mianyangapp.R;
import cn.com.swu.mianyangapp.bean.Text;

public class ViewTextActivity extends AppCompatActivity {

    Text text=new Text();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_view_text);
        TextView textTitle=findViewById(R.id.etext_Title);
        TextView recvTele=findViewById(R.id.erecv_tele);
        TextView textContent=findViewById(R.id.editTextTextMultiLine);

        Bundle bundle = this.getIntent().getExtras();

        if(bundle!=null)
        {
            text.setTextTitle(bundle.get("mtextTitle").toString());
            text.setTextContent(bundle.get("mtextContent").toString());
            text.setRecvTele(bundle.get("mrecvTele").toString());
            text.setTextID(Integer.parseInt(bundle.get("mtextID").toString()));

            textTitle.setText(text.getTextTitle());
            recvTele.setText(text.getRecvTele());
            textContent.setText(text.getTextContent());
        }

    }
}